package week2;
public class Homework22 {
    public static void main(String[] args) {
        int m;
        int a, b, c; 
        for (m = 100; m <= 999; m ++) {
		a = m / 100;
        	b = (m - a * 100) / 10;
        	c = m - 100 * a - 10 * b;
		if(a * a * a + b * b * b + c * c * c == m){
                System.out.println(m);
            }
        }
    }
}